package com.fenxiangle.yueding.entity;

public enum OrderType {
    SB("失败", -1),
    DJD("待接单 ", 0),
    YWC("已完成", 1),
    DFK("待付款", 2),
    JYZ("交易中", 3),
    DQR("待确认 ", 4),
    DPJ("待评价", 5),
    SSZ("申诉中 ", 6);
    // 成员变量
    private String name;
    private int index;

    // 构造方法
    private OrderType(String name, int index) {
        this.name = name;
        this.index = index;
    }

    // 普通方法
    public static String getName(int index) {
        for (OrderType c : OrderType.values()) {
            if (c.getIndex() == index) {
                return c.name;
            }
        }
        return null;
    }

    // get set 方法
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }

    }